package com.frxuexi.lib_base.utils

import android.content.Context
import android.util.AttributeSet
import android.widget.TextView
import com.blankj.utilcode.util.LogUtils
import java.text.SimpleDateFormat

class MyTextView:androidx.appcompat.widget.AppCompatTextView {
    constructor(context: Context) : super(context)
    constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)

    private var eventId:String?=null

    fun setEvent(event:String){
        eventId=event
    }

    override fun performClick(): Boolean {
        //埋点日志
        LogUtils.i("${SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(System.currentTimeMillis())} 按钮点击：${eventId}")
        return super.performClick()
    }

}